﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Collections;
using GPCSC.Webs;

namespace HSYCWeb.web.DOCS.AJAX
{
    /// <summary>
    /// yzUser 的摘要说明
    /// </summary>
    public class yzUser : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            context.Response.Write("Hello World");
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
        #region IHttpHandler 成员

        bool IHttpHandler.IsReusable
        {
            get { throw new NotImplementedException(); }
        }
        /// <summary>
        /// 保存活动
        /// </summary>
        /// <param name="context"></param>
        void IHttpHandler.ProcessRequest(HttpContext context)
        {
            try
            {
                string hdid = context.Request["user"].ToString();
                DataSet ds = new DataSet();
                Hashtable hab = new Hashtable();
                hab.Add("@userName",hdid);
                ds = new SqlReadXml().ReaderDataSet("sel_user_one", hab);
                if (ds != null)
                {
                    if (ds.Tables.Count > 0)
                    {
                        string str = "";
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            str = "false";
                            context.Response.ContentType = "text/plain";
                           
                            context.Response.Write(str);
                        }
                        else
                        {
                            str = "true";
                            context.Response.ContentType = "text/plain";

                            context.Response.Write(str);
                        }
                        
                        
                    }
                }
                   
                
               
               
            }
            catch (Exception ee)
            {
                throw ee;
            }

        }

        #endregion
    }
}